<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>西藏市政府意见征集</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      margin: 0;
      padding: 0;
      background: linear-gradient(to bottom, #3498db, #2980b9);
      display: flex;
      justify-content: center;
      height: 100vh;
      color: #fff;
    }

    #feedback-container {
      background-color: rgba(255, 255, 255, 0.8);
      padding: 40px;
      border-radius: 15px;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
      text-align: center;
      max-width: 800px;
      width: 100%;
    }

    h1 {
      color: #3498db;
      margin-bottom: 20px;
    }

    form {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      margin-top: 20px;
    }

    .form-group {
      flex: 0 0 48%;
      margin-bottom: 20px;
    }

    label {
      margin-bottom: 10px;
      font-size: 18px;
      color: #333;
      display: block;
    }

    input,
    textarea {
      width: 100%;
      padding: 15px;
      border: 1px solid #3498db;
      border-radius: 8px;
      resize: vertical;
      color: #333;
    }

    .select-wrapper {
      position: relative;
      width: 100%;
      overflow: hidden;
    }

    select {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      width: calc(100% - 30px);
      padding: 15px;
      border: 1px solid #3498db;
      border-radius: 8px;
      background: #fff;
      color: #333;
      cursor: pointer;
      position: relative;
      z-index: 2;
    }

    .select-arrow {
      position: absolute;
      top: 50%;
      right: 0;
      transform: translateY(-50%);
      width: 30px;
      height: 100%;
      background: linear-gradient(to right, #3498db, #2980b9);
      pointer-events: none;
      z-index: 1;
    }

    .radio-group {
      display: flex;
      justify-content: space-between;
    }

    .checkbox-group {
      display: flex;
    }

    button {
      width: 100%;
      padding: 15px;
      font-size: 18px;
      cursor: pointer;
      background: linear-gradient(to right, #3498db, #2980b9);
      color: #fff;
      border: none;
      border-radius: 8px;
      transition: background 0.3s, transform 0.2s;
    }

    button:hover {
      background: linear-gradient(to right, #2980b9, #3498db);
      transform: scale(1.05);
    }

    #comments-container {
      margin-top: 30px;
      text-align: left;
    }

    .comment {
      background-color: rgba(255, 255, 255, 0.9);
      padding: 15px;
      border-radius: 8px;
      margin-bottom: 20px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      color: #333;
    }

    .box {
      position: fixed;
      top: 20%;
      right: 50px;
      width: 200px;
      letter-spacing: 2px;
      background-color: rgba(0, 0, 0, 0.3);
      color: #fff;
      border-radius: 15px;
      padding: 20px;
    }
  </style>
</head>

<body>

  <div id="feedback-container">
    <h1>西藏市政府意见征集</h1>
    <form>
      <div class="form-group">
        <label for="name">姓名：</label>
        <input type="text" id="name" name="name" required>
      </div>

      <div class="form-group">
        <label for="email">电子邮件：</label>
        <input type="email" id="email" name="email" required>
      </div>

      <div class="form-group">
        <label for="phone">联系电话：</label>
        <input type="tel" id="phone" name="phone">
      </div>

      <div class="form-group">
        <label for="feedback">留言：</label>
        <textarea id="feedback" name="feedback" rows="4" required></textarea>
      </div>

      <div class="form-group">
        <label for="category">意见类别：</label>
        <div class="select-wrapper">
          <select id="category" name="category">
            <option value="traffic">交通建设</option>
            <option value="environment">环境保护</option>
            <option value="education">教育事务</option>
          </select>
          <div class="select-arrow"></div>
        </div>
      </div>

      <div class="form-group radio-group">
        <label>性别：</label>
        <input type="radio" id="male" name="gender" value="male">
        <label for="male">男性</label>
        <input type="radio" id="female" name="gender" value="female">
        <label for="female">女性</label>
      </div>

      <div class="form-group checkbox-group">
        <label>选择您感兴趣的领域：</label>
        <input type="checkbox" id="politics" name="interests" value="politics">
        <label for="politics">政治</label>
        <input type="checkbox" id="economy" name="interests" value="economy">
        <label for="economy">经济</label>
        <input type="checkbox" id="culture" name="interests" value="culture">
        <label for="culture">文化</label>
      </div>

      <div class="form-group">
        <label for="rating">评分（1-10）：</label>
        <input type="number" id="rating" name="rating" min="1" max="10" required>
      </div>

      <button type="button" onclick="submitForm()">提交</button>
    </form>

    <div id="comments-container">
      <h2>留言板</h2>
      <div class="comment">感谢市民对我们的支持！</div>
      <div class="comment">希望政府可以更好地改善交通状况。</div>
      <div class="comment">新的建议：增设更多的绿化带。</div>
      <!-- 添加更多已有的留言 -->
    </div>
  </div>

  <div class="box">
    欢迎您对西藏自治区政治、经济、文化、社会建设等方面提出宝贵意见和建议。对有合理诉求的信件，我们将通过一定的程序转给各有关部门，并在法定时限内由相关单位在网上向您反馈处理结果。
  </div>

  <script>
    function submitForm () {
      // 简单的客户端验证，确保姓名、电子邮件、留言和评分都填写了
      var name = document.getElementById("name").value
      var email = document.getElementById("email").value
      var feedback = document.getElementById("feedback").value
      var rating = document.getElementById("rating").value

      if (!name || !email || !feedback || !rating) {
        alert("请填写所有必要信息！")
        return
      }

      // 在此处执行提交表单的操作，可以发送到后端进行处理
      // 此处仅为示例，实际项目中应该使用 AJAX 或其他方法发送数据到服务器
      alert("表单已提交！")

      // 清空表单
      document.getElementById("name").value = ""
      document.getElementById("email").value = ""
      document.getElementById("feedback").value = ""
      document.getElementById("rating").value = ""
    }
  </script>
</body>

</html>